﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Jack.IData
{
    //@jack mark 读取配置生成一次配置
    public class SingletonDataInfo
    {
        private static SingletonDataInfo instance = null;
        private static object _obj = new object();
        private DataConfig _dataconfig = null;
        private SingletonDataInfo()
        {
            _dataconfig = new DataConfig();
        }

        public static SingletonDataInfo Instance
        {
            get
            {
                if (instance == null)
                {
                    lock (_obj)
                    {
                        if (instance == null)
                        {
                            instance = new SingletonDataInfo();
                        }
                    }                    
                }
                return instance;
            }
        }

        public List<WebInfo> WebInfoList
        {
            get
            {
               return _dataconfig.InitWebInfo();
            }
        }
    }
}
